Infinity-End-Event names a function, with lambda list (D USER RECIPIENT/S):
Attempt to end an event.
End an event begun by TOOTSVILLE INFINITY-START-EVENT, q.v.
End an event begun by TOOTSVILLE INFINITY-START-EVENT, q.v.
Lisp END-EVENT = JSON endEvent
{ c: "endEvent", d: { moniker: "event moniker", ( id | eventID ): "event ID", status: ( "cmp" | "cxl" ), [ medal: "medal", ] [ score: "score" ] } }
This command terminates an event (such as a fountain, store purchase, or minigame) which was begun with TOOTSVILLE INFINITY-START-EVENT, qv.
The parameter eventID can be referenced as id instead --- but that is deprecated (since Romance 1.0) and will (eventually) be dropped.
The status code is either cmp, if the event was completed in some way (successfully or otherwise), or cxl, if the event was canceled before it reached any ind of completion.
The score and medal parameters are optional, and depend on the type of event. They should never be submitted with a cxl cancel packet, and are not needed for an item purchase. They are sometimes to be used with minigames. The score has a special relationship with magic fountains, described below.
The response to a canceled (status: "cxl") event will be of the form:
{ from: "endEvent", status: true, ended: "eventID", canceled: true }
The response to a completed (status: "cmp") event will be of the form:
{ from: "endEvent", status: true, ended: "eventID", peanuts: peanuts, fairyDust: fairyDust, [ highScores: { 1: { points: points, userName: "user name" }, 2: ... 24: }, ] totalPeanuts: total, totalFairyDust: total, [ gotHighScore: index ]
The endEvent packet for a completed event indicates:
An error response is of the form:
{ from: "endEvent", status: false, eventID: "event UUID", err: "error code", error: "User-visible error message" }
The error code can be one of:
WRITEME
Defined in file src/infinity/legacy-commands.lisp.